package cn.com.dhc.danlu.activity.base;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.ViewGroup;

import com.umeng.analytics.MobclickAgent;

import cn.com.dhc.danlu.R;
import cn.com.dhc.danlu.widget.DLToolbar;

/**
 * User: Geek_Soledad(wuhaiyang@danlu.com)
 * Date: 2016-09-20
 * Time: 10:38
 * Description: 脱离先有的BaseActivity
 */
@SuppressLint("Registered")
public class DanluBaseActivity extends AppCompatActivity {
    protected DLToolbar mToolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public void setContentView(int layoutResID) {
        super.setContentView(layoutResID);
        initGeneraComponent();
    }

    @Override
    public void setContentView(View view) {
        super.setContentView(view);
        initGeneraComponent();
    }

    @Override
    public void setContentView(View view, ViewGroup.LayoutParams params) {
        super.setContentView(view, params);
        initGeneraComponent();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
    }

    private void initGeneraComponent() {
        mToolbar = (DLToolbar) findViewById(R.id.toolbar);
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
    }

    @Override
    protected void onPause() {
        super.onPause();
        MobclickAgent.onPause(this);//session的统计
    }

    @Override
    protected void onResume() {
        super.onResume();
        MobclickAgent.onResume(this);//session的统计
    }
}